<HTML><HEAD><TITLE>mzn2fzn(+ModelFile, +InstFileOrParMap, ++SolverOrOptions, ?FznFile)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(minizinc)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>mzn2fzn(+ModelFile, +InstFileOrParMap, ++SolverOrOptions, ?FznFile)</H1>
Convert a MiniZinc model into a FlatZinc model
<DL>
<DT><EM>ModelFile</EM></DT>
<DD>File name (extension defaults to .mzn)
</DD>
<DT><EM>InstFileOrParMap</EM></DT>
<DD>Instance file name (extension defaults to .dzn, then .mzn), or list of Id=Term correspondences
</DD>
<DT><EM>SolverOrOptions</EM></DT>
<DD>Name of solver mapping module, or zn_options-structure
</DD>
<DT><EM>FznFile</EM></DT>
<DD>Name of generated FlatZinc file (will be generated if variable)
</DD>
</DL>
<H2>Description</H2>
<P>
	Converts a MiniZinc model (given a model file and an instance
	file or parameter map) into a FlatZinc model, by invoking the
	external mzn2fzn converter with the appropriate arguments.
	If no output file name is specified (FznFile uninstantiated),
	the name of the output file is the same as the input file, with
	the extension changed to .fzn.  The options should specify the
	solver that is intended to be used on the FlatZinc model (so that
	the correct version of globals.mzn is used), and the fzn_tmp
	option should be set to 'file' (the default).
    </P>
<H3>Modes and Determinism</H3><UL>
<LI>mzn2fzn(+, +, ++, ?) is det
</UL>
<H2>Examples</H2>
<PRE>
    ?- mzn2fzn(mymodel, [], zn_options{solver:fzn_ic,fzn_tmp:file}, FznFile).
    FznFile = "mymodel.fzn"
    Yes (0.00s cpu)
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/minizinc/mzn_run-3.html">mzn_run / 3</A>, <A HREF="../../lib_public/flatzinc/fzn_run-2.html">flatzinc : fzn_run / 2</A>, <A HREF="../../lib_public/flatzinc/zn_options-s.html">flatzinc : struct(zn_options)</A>
</BODY></HTML>
